const Axios = require('../utils/request');
const API = '/user';

// 查询会员服务
const getFrontMemberServiceList = params => {
  return Axios.http({url: API + '/memberService/getFrontMemberServiceList', data: params, method: 'GET'})
}
// 申请试用
const applyMemberServiceOrder = params => {
  return Axios.http({url: API + '/memberServiceOrder/applyMemberServiceOrder', data: params, method: 'POST'})
}
// 查询登录用户会员服务状态
const getUserServiceState = params => {
  return Axios.http({url: API + '/userServiceOrder/getUserServiceState', data: params, method: 'GET'})
}
// 查询登录用户详情
const getLoginUser = params => {
  return Axios.http({url: API + '/user/getLoginUser', data: params, method: 'GET'})
}
// 用户接口：修改登录密码
const modifyPassword = params => {
  return Axios.http({url: API + '/user/modifyPassword', data: params, method: 'POST'})
}
// 用户接口：修改登录密码
const modifyPhoneNumber = params => {
  return Axios.http({url: API + '/user/modifyPhoneNumber', data: params, method: 'POST'})
}
// 用户接口：重置密码
const resetPassword = params => {
  return Axios.http({url: API + '/user/resetPassword', data: params, method: 'POST'})
}
// 用户接口：用户设置登录密码
const setPassword = params => {
  return Axios.http({url: API + '/user/setPassword', data: params, method: 'POST'})
}
// 用户接口：用户设置用户名
const setUsername = params => {
  return Axios.http({url: API + '/user/setUsername', data: params, method: 'POST'})
}

module.exports = {
  getFrontMemberServiceList,
  applyMemberServiceOrder,
  getUserServiceState,
  getLoginUser,
  modifyPassword,
  modifyPhoneNumber,
  resetPassword,
  setPassword,
  setUsername,
}